Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: switch to runc/libcontainer/cgroups cgroup manager, from sylabs 531 #41

Closed
wants to merge 1 commit into from

Conversation

edytuk
Copy link
Collaborator

@edytuk edytuk commented Mar 7, 2022

This pulls in sylabs PR

The original PR description was:

Switch our cgroups management dependency from containerd/cgroups to opencontainers/runc/libcontainer/cgroups in order to ease implementation of systemd / unprivileged delegation etc.

This is the first step of the process of tidying up the cgroups manager code. At this point I have chosen to:

  • Implement the existing cgroups.Manager interface with a new cgroups.ManagerLC in manager_libcontainer_linux.go. This avoids code changes in the runtime for this initial swap-out.
  • Remove the old containerd/cgroups based cgroups.ManagerV1 and cgroups.ManagerV2.
  • Retain the tests that were run against the old ManagerV1 and ManagerV2 and point them to ManagerLC.

The purpose of this approach is to first be happy that there's no impact from switching the dep out.

Refactoring will occur to address the facts that:

  • The cgroups.Manager is a pretty nasty interface... and involves a bunch of messy code in the manager to implement.
  • We can work much more directly with the libcontainer code's New/Set/Apply cycle.
  • We need to extend for systemd and rootless cgroups management.
  • Testing needs to be overhauled and expanded for the above.

@edytuk edytuk requested a review from DrDaveD March 7, 2022 15:15
Copy link
Collaborator

@DrDaveD DrDaveD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok now, but it's better if it is reduced to 1 commit.

Add a libcontainer/cgroups based manager that implements the existing
cgroups.Manager API.

Remove the containerd/cgroups based managers.

Signed-off-by: Edita Kizinevic <edita.kizinevic@cern.ch>
@edytuk edytuk changed the title deps: switch to runc/libcontainer/cgroups cgroup manager, from sylabs531 deps: switch to runc/libcontainer/cgroups cgroup manager, from sylabs 531 Mar 8, 2022
@edytuk edytuk closed this Mar 8, 2022
@edytuk edytuk deleted the sylabs531 branch March 10, 2022 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants